
const tokenName = 'YCY_T';
const expiresTimeName = 'YCY_TIME';
const userInfoName = 'YCY_U';

export default {
	//token
	TOKEN: tokenName,
	EXPIRES_TIME: expiresTimeName,
	GET_CACHE: (name) => {
		return uni.getStorageSync(name);
	},
	SET_CACHE: (name, data) => {
		return uni.setStorageSync(name, data);
	},
	CLEAR_CACHE: (name) => {
		return uni.removeStorageSync(name);
	},
	GET_TOKEN: () => {
		return uni.getStorageSync(tokenName);
	},
	SET_TOKEN: (token) => {
		return uni.setStorageSync(tokenName, token);
	},
	CLEAR_TOKEN: () => {
		return uni.removeStorageSync(tokenName);
	},
	GET_USERINFO: () => {
		return uni.getStorageSync(userInfoName);
	},
	SET_USERINFO: (data) => {
		return uni.setStorageSync(userInfoName, data);
	},
	CLEAR_USERINFO: () => {
		return uni.removeStorageSync(userInfoName);
	}
}
